package com.gw.vip.server.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gw.vip.common.log.PrintlnLog;
import com.gw.vip.common.vo.Result;
import com.gw.vip.server.dto.HisClearLedgerListDto;
import com.gw.vip.server.po.HisClearLedger;
import com.gw.vip.server.service.dao_service.HisClearLedgerService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * @author GW
 * @description
 * @since 2022-09-30
 */
@RestController
@RequestMapping("hisClearLedger")
@Slf4j
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class HisClearLedgerController {

    private final HisClearLedgerService hisClearLedgerService;

    @PrintlnLog(description = "总账信息")
    @PostMapping("list")
    public Result list(@RequestBody @Valid HisClearLedgerListDto dto){
        IPage<HisClearLedger> vo = hisClearLedgerService.getList(dto);
        return Result.success(vo);
    }
}
